﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PriErp.Commands
{
    public partial class MessageBoxCtl : UserControl
    {
        public MessageBoxCtl()
        {
            InitializeComponent();
        }

        public string Message
        {
            set { this.lblMessage.Text = value; }
        }
        /// <summary>
        /// 点击确定的事件
        /// </summary>
        public event EventHandler OnSubmiting;

        /// <summary>
        /// 点击确定的事件
        /// </summary>
        public event EventHandler OnCanceling;

        private void btnYes_Click(object sender, EventArgs e)
        {
            if (OnSubmiting != null)
                OnSubmiting(sender, e);
        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            if (OnCanceling != null)
                OnCanceling(sender, e);
        }
    }
}
